// global object
const a: Array<number> = [1, 2, 3]
const date = new Date()
date.getTime()
const reg = /abc/
reg.test("acsd")

// build-in object
Math.pow(2, 2)

// DOM and BOM
let body = document.body
// body.append()
let allLis = document.querySelectorAll('li')
// allLis.keys()

document.addEventListener('click', (e) => {
  e.preventDefault()
})

// Utility Types
interface IPerson {
  name: string
  age: number
  des: string
  student: boolean
}

let viking: IPerson = { name: "viking", age: 12, des: "my name viking", student: true }

// Partial<T> 可以不填写完整
type IPArtial = Partial<IPerson>
let viking2: IPArtial = { age: 12 }

// Omit<T> 省略指定参数
type IOmit = Omit<IPerson, "name" | "des">
let viking3: IOmit = { age: 12,student: false }